package com.bestillet.defaultmultishop;

import android.os.Parcel;
import android.os.Parcelable;

public class Category implements Parcelable {
	private String title, extra;
	
	private int idx;
	
	public Category(int idx, String title, String extra) {
		this.idx = idx;
		this.title = title;
		this.extra = extra;
	}
	
	public Category() {
		
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getExtra() {
		return extra;
	}

	public void setExtra(String extra) {
		this.extra = extra;
	}

	public int getIdx() {
		return idx;
	}

	public void setIdx(int idx) {
		this.idx = idx;
	}

	@Override
	public int describeContents() {
		return 0;
	}

	@Override
	public void writeToParcel(Parcel out, int flags) {
		out.writeInt(idx);
		out.writeString(title);
		out.writeString(extra);
	}
	
	public static final Parcelable.Creator<Category> CREATOR = new Parcelable.Creator<Category>() {
		@Override
		public Category createFromParcel(Parcel in) {
			return new Category(in);
		}

		@Override
		public Category[] newArray(int size) {
			return new Category[size];
		}
	};
	
	private Category(Parcel in) {
		this.idx = in.readInt();
		this.title = in.readString();
		this.extra = in.readString();
	}
}